<?php
//+-----------------------------------------------------------
//| 人生是荒芜的旅行，冷暖自知，苦乐在心
//+-----------------------------------------------------------
//| Author:Janmas <janmas@126.com>
//+-----------------------------------------------------------
//| 
//+-----------------------------------------------------------


namespace app\admin\validate;


use think\exception\ValidateException;

class AdminValidate extends \app\common\validate\BaseValidate
{
    protected function showException ( ValidateException $exception )
    {
        throw new \app\admin\exception\ValidateException($exception->getError(),$exception->getCode());
    }

	protected function checkController($value){
		if(is_numeric($value[1])){
			throw new ValidateException('控制器名的第一个字符不能是数字');
		}
		return true;
	}

	protected function checkAction($value){
		if(is_numeric($value[1])){
			throw new ValidateException('方法名的第一个字符不能是数字');
		}
		return true;
	}
}